<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>佐心，教家长做父母</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="assets/css/amazeui.min.css">
    <link rel="stylesheet" href="assets/css/style.css?v=2.3">
    <link rel="stylesheet" href="assets/css/index.css?v=2.3">
    <script>
    	var orderSn='${param.orderSn}';
    </script>
    <script>
    	    /** 
     * 返回前一页（或关闭本页面） 
     * <li>如果没有前一页历史，则直接关闭当前页面</li> 
     */  
    function goBack(){  
        if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)){ // IE  
            if(history.length > 0){  
                window.history.go( -1 );  
            }else{  
                location.href="${ctx}/index.jsp";
            }  
        }else{ //非IE浏览器  
            if (navigator.userAgent.indexOf('Firefox') >= 0 ||  
                navigator.userAgent.indexOf('Opera') >= 0 ||  
                navigator.userAgent.indexOf('Safari') >= 0 ||  
                navigator.userAgent.indexOf('Chrome') >= 0 ||  
                navigator.userAgent.indexOf('WebKit') >= 0){  
      
                if(window.history.length > 1){  
                    window.history.go( -1 );  
                }else{  
                    location.href="${ctx}/index.jsp";
                }  
            }else{ //未知的浏览器  
                window.history.go( -1 );  
            }  
        }  
    }  
    </script>
</head>
<body class="bg-white">
<header data-am-widget="header" class="am-header am-header-default am-header-fixed am-border-bottom">
    <div class="am-header-left am-header-nav">
        <a  onclick="goBack();"  >
            <i class="icon_8"></i>
        </a>
    </div>
    <h1 class="am-header-title">
        评价
    </h1>

    <div class="am-header-right am-header-nav am-text-right" onclick="fabiao();">
        发表
    </div>
</header>
<section class="am-padding-bottom-sm" id="amz-main" data-tag="css-nav">

    <!--咨询师-->
    <div class="am-g  am-padding-top-sm ">
        <div class=" am-u-sm-12 am-list-main box am-padding-left-sm">
            <div class="width-75px">
                <a class="">
                    <img class="img-65" id="person" src=""/>
                </a>
            </div>
            <div class="box-1">
                <div class="am-list-item-hd font-color-13" id="counseName">
                    
                </div>

                <div class="font-12  font-color-15" id="proName">
                    
                </div>
                <div class="font-14  font-color-15" id="goodDirection">
                </div>
            </div>
        </div>
    </div>
    <div class="font-16 font-color-13 margin-top-20 am-padding-left-sm">
        <span class="am-fl font-color-15 am-margin-right-xs">评分：</span>
        <span class="" id="span_grade">
        <i class="icon-star"></i>
        <i class="icon-star"></i>
        <i class="icon-star"></i>
        <i class="icon-star"></i>
        <i class="icon-star"></i>
        </span>

        <div class="am-cf"></div>
    </div>

    <div class="bg-white font-14  am-padding-top-xs am-padding-left-sm am-padding-bottom-xs am-padding-right-sm border-1 am-margin-sm margin-top-20">
        <textarea class="teshu-yaoqiu" rows="6"  id="pingjia" placeholder="请说说你的看法..."></textarea>
    </div>

</section>


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.min.js"></script>
<script>

	function fabiao(){
		var pingjiaxx=$("#span_grade").find(".cur").length;
		var pingjia=$("#pingjia").val();
		location.href="gotoPingjiaOrder?orderSn="+orderSn+"&pingjiaxx="+pingjiaxx+"&pingjia="+pingjia;
	}

	var counselorStr=$.ajax({url:"myData3?orderSn="+orderSn,async:false});
	var counselorJson=JSON.parse(counselorStr.responseText);
	if(counselorJson.resultCode==0){
		$("#counseName").text(counselorJson.counselor.counseName);
		$("#proName").text(counselorJson.counselor.proName);
		$("#goodDirection").text("擅长方向："+counselorJson.counselor.goodDirection);
		$("#person").attr("src",counselorJson.counselor.personHead);
	}
    $("#span_grade .icon-star").each(function(index,item){
        $(item).on("click", function () {
            $("#span_grade .icon-star").removeClass("cur");
            for(var i=0;i<=index;i++){
                $("#span_grade .icon-star:eq("+i+")").addClass("cur");
            }
        });
    });


</script>
</body>
</html>